package ua.com.globallogic.basecamp.krasnyanskiy.anagrams;

import java.util.*;

public class Anagram {
    public Set<String> words;

    public Anagram() {
        this.words = new HashSet<String>();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        for (String anagram : words)
            sb.append(anagram).append(", ");
        return sb.toString().
                substring(0, sb.toString().length()-2)
                + "\n";
    }
}
